FilCDN M2 Payment Setup
Motivation
We want a simple payment setup that rewards both CDN and SP for serving retrievals, but serves more as a placeholder for future iterations than trying to be a fully specced out system. It has two goals: There are payments, but they are not hindering product development. It’s not too expensive, and not too complex.
Payment Rails
For each PDP proof set withCDN=true, there will be 3 payment rails:
- PDP
- Cashflow: Client ➡️ SP
- Expectation: SP fulfills PDP proofs
- Verifier:
PDPVerifier✅
- Settlement: Validated by PDP verifier
- Example: Client pays SP 2$ for storing 1TB of data for 1 month.
- Notes
- This is already in place and owned by the FilOz team
- SP serves cache misses to CDN
- Cashflow: Client ➡️ SP
- Expectation: SP serves PDP data to FilCDN (on cache miss) only if `addCDN` is purchased
- Verifier:
CDNVerifier⌛
- Pricing scheme: .50$/m
- Settlement:
- validated by
CDNVerifier, which tracks SP availability. For now, FilCDN only cares whether the SP was able to serve the file on cache-miss or not.
- We would like to deploy an initial version without the verifier, in which case the SP can withdraw independently of their performance - for the sake of an iterative approach. Question: Is it acceptable to ship without a verifier to early users? Or does there have to be a verifier, guiding the relationship between user and SP?
- validated by
- Example: Client pays SP .50$ per month for reliably serving cache-miss egress to the CDN.
- Notes:
- From a legal perspective it’s safer when the Client rewards the SP for FilCDN services, and not FilCDN
- FilCDN can still ensure through a verifier contract that SP only gets rewarded if they perform well. For this, FilCDN doesn’t need to be the one paying the SP - thanks to the verifier concept.
- This flat fee can be adjusted later on, once we have learned more. It represents half of what’s defined in https://github.com/FilOzone/filecoin-services/blob/1b99d8b39bf7f35608884b0bd7bd768810ee2372/service_contracts/src/PandoraService.sol#L39
- FilCDN serves retrievals
- Cashflow: Client ➡️ FilCDN
- Expectation: FilCDN serves retrievals
- Verifier: ❌ (Trusted)
- Pricing scheme: .50$/m
- Settlement:
- No requirements, FilCDN is a trusted party
- Example: Client pays FilCDN .50$ for accelerating PDP content for one month.
- Notes:
- For now, FilCDN will have to be trusted (lack of proof of retrieval). Potential future solution: Marketplace of different CDNs
- This flat fee can be adjusted later on, once we have learned more. It represents half of what’s defined in https://github.com/FilOzone/filecoin-services/blob/1b99d8b39bf7f35608884b0bd7bd768810ee2372/service_contracts/src/PandoraService.sol#L39
References
Notes
- When reading, replace every mention of
$withUSDFC